import request from '@/utils/request'

export const MenuTreeList = params => {
  return request({
    url: '/sysMenu/treeDate',
    method: 'get',
    params: params
  })
}

export const addMenu = (data) => {
  return request({
    url: '/sysMenu/add',
    method: 'post',
    data: data
  })

}
export const editMenu = (data) => {
  return request({
    url: '/sysMenu',
    method: 'put',
    data: data
  })

}

export const delMenu = (data) => {
  return request({
    url: '/sysMenu/delete',
    method: 'delete',
    data: data
  })

}

export const getRoleList = params => {
  return request({
    url: '/role/list',
    method: 'get',
    params: params
  })

}
export const  getMenuInfo=(menuId)=>{
  return  request({
    url: '/sysMenu/getInfo/'+menuId,
    method:'get',
  })
}
